<script setup lang='ts'>
import { ref } from 'vue';
import Child from './14_父子通信中的子组件.vue'
const username = ref("张三") // 声明响应式数据
const age = ref(123) // 声明响应式数据
const Change = () => {
    username.value = "李四"
    age.value++
}
</script>

<template>
    <div class="parent">
        <h1>当前的父组件</h1>
        <p>{{ username }}</p>
        <p>{{ age }}</p>
        <button @click="Change">测试</button>
        <Child :name="username" :age="age"></Child>
    </div>
</template>

<style scoped></style>